package cn.mln521.aspectJ.demo2;

import org.aspectj.lang.ProceedingJoinPoint;

/**
 * Xml 切面类
 */
public class MyAspectXml {

    public void before() {
        System.out.println("前置通知");
    }

    public void afterReturing(Object obj) {
        System.out.println("后置通知" + obj);
    }

    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        System.out.println("环绕前通知");
        Object obj = joinPoint.proceed();
        System.out.println("环绕后通知");
        return obj;
    }

    public void afterThrowing(Throwable e) {
        System.out.println("异常抛出通知" + e);
    }

    public void after() {
        System.out.println("最终通知");
    }
}
